<style scoped lang="less">
@import "../styles/set.less";
.hello h1{
  color:red;
  font-size:@fontSize;
}
</style>

<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <ul>
        <li v-for="item in list" :key="item.id">{{item.id}} {{item.name}}</li>
    </ul>
  </div>
</template>

<script>
export default {
  data () {
    return {
      msg: 'home'
    }
  },asyncData({store,route}){
    console.log('home asyncData')
    return store.dispatch('set_list')
  },computed:{
    list(){
      return this.$store.state.list
    }
  }
}
</script>
